package cn.iocoder.yudao.module.acm.dal.mysql.onboardsupply;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.module.acm.controller.admin.onboardsupply.vo.OnboardSupplyPageReqVO;
import cn.iocoder.yudao.module.acm.dal.dataobject.onboardsupply.OnboardSupplyDO;
import org.apache.ibatis.annotations.Mapper;

/**
 * 航机管理-机供品分类管理 Mapper
 *
 * @author yisla
 */
@Mapper
public interface OnboardSupplyMapper extends BaseMapperX<OnboardSupplyDO> {

    default PageResult<OnboardSupplyDO> selectPage(OnboardSupplyPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<OnboardSupplyDO>()
                .likeIfPresent(OnboardSupplyDO::getName, reqVO.getName())
                .eqIfPresent(OnboardSupplyDO::getCategoryType, reqVO.getCategoryType())
                .orderByDesc(OnboardSupplyDO::getId));
    }

}